﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace SXFramWork.Core
{
    /// <summary>
    /// 开启事务
    /// </summary>
    [AttributeUsage(AttributeTargets.Method, Inherited = true)]
    public class TransactionAttribute: Attribute
    {
        /// <summary>
        /// 事务
        /// </summary>
        /// <param name="isolationLevel">隔离级别</param>
        public TransactionAttribute(IsolationLevel isolationLevel=IsolationLevel.ReadUncommitted)
        {
            _isolationLevel = isolationLevel;
        }
        /// <summary>
        /// 事务隔离级别
        /// </summary>
        public IsolationLevel _isolationLevel { get; set; }
    }
}
